<!--{eval $bodyClass ='center-vh overflow-y-auto';}-->
<!--{template lyear:header_simple}-->
<style>
	.chk_newpasswd {
		display: none;
	}
	.has-error .chk_newpasswd{
		display: block;
	}
</style>
<div id="wrapper_div" style="width: 100%;height:100%;  position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; overflow: hidden;z-index:0;  font-size: 0px; background:{eval echo $_G['setting']['loginset']['bcolor']?$_G['setting']['loginset']['bcolor']:'#76838f';};"> 
	<!--{if !$_G['setting']['loginset']['bcolor']}-->
	<img src="{eval echo $_G['setting']['loginset']['img']?$_G['setting']['loginset']['img']:MOD_PATH.'/images/login.jpg';}" name="imgbg" id="imgbg" style="right: 0px; bottom: 0px; top: 0px; left: 0px; z-index:1;margin:0;padding:0;overflow:hidden; position: absolute;width:100%;height:100%" height="100%" width="100%">
	<!--{/if}-->
    <!--{if $_G['setting']['loginset']['url']}-->
    <iframe id="wrapper_frame" name="wrapper_frame" src="$_G['setting']['loginset']['url']" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true" style="z-index:2;position:absolute;width:100%;height:100%;background:url(dzz/images/b.gif);"></iframe>
    <!--{/if}-->
</div>
<div class="card card-shadowed p-4 mb-0 mr-2 ml-2" style="width: 420px;" id="lostpw_container_$loginhash">
    <div class="card-body text-center">
        <div class="text-center mb-3">
            <img src="<!--{if $_G['setting']['bbclosed']}-->static/image/common/logo.png<!--{else}-->{eval echo $_G['setting']['sitelogo']?'index.php?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):'static/image/common/logo.png';}<!--{/if}-->">
        </div>
        <h2 class="main-title">{lang getpassword}</h2>
	</div>
		<form class="signin-form form-horizontal" role="form" method="post" action="user.php?mod=login&op=logging&action=getpasswd&uid=$uid&id=$hashid" onsubmit="return validate(this);">
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<div class="row mb-3">
				<label class="col-sm-3">{lang login_email}</label>
				<div class="col-sm-9">
					<input type="text" class="form-control" autocomplete="off" value="$member[email]" disabled>
				</div>
			</div>
			<div class="row mb-3">
				<label class="col-sm-3" for="newpasswd1">{lang new_password}</label>
				<div class="col-sm-9">
					<input class="form-control" type="password" id="newpasswd1" name="newpasswd1" autocomplete="off" placeholder="{lang new_password}" required>
				</div>
			</div>
			<div class="row mb-3">
				<label class="col-sm-3" for="newpasswd2">{lang new_password}</label>
				<div class="col-sm-9">
					<input class="form-control" type="password" id="newpasswd2" name="newpasswd2" autocomplete="off" placeholder="{lang new_password_confirm}" required>
					<span class="text-danger chk_newpasswd">两次密码输入的不一样</span>
				</div>
			</div>
			<div class="mb-3 d-grid">
				<button class="btn btn-round btn-primary" role="button" type="submit" name="getpwsubmit" value="true">{lang identify_changes}</button>
				<a class="btn btn-round btn-success mt-1" href="$_G['siteurl']" title="{lang back_homepage}">{lang back_homepage}</a>
			</div>
		</form>
    <p class="text-center text-muted mb-0"><!--{template lyear:copyright}--></p>
</div>
<script type="text/javascript" src="user/scripts/register.js?{VERHASH}"></script>
<script type="text/javascript">
	function validate(form) {
		if(document.getElementById('newpasswd1').value == '') {
			document.getElementById('newpasswd1').focus();
			return false;
		} else if(document.getElementById('newpasswd2').value == '') {
			document.getElementById('newpasswd2').focus();
			return false;
		} else if(document.getElementById('newpasswd1').value != document.getElementById('newpasswd1').value) {
			document.getElementById('newpasswd2').focus();
			return false;
		}
		var loader = $('.card-shadowed').lyearloading({
			opacity           : 0.1,
			textColorClass    : 'text-primary',
			spinnerColorClass : 'text-primary',
			spinnerSize       : 'nm',
			spinnerText       : '后台处理中，请稍后...',
		});
		return true;
	}
	var strongpw = new Array();
	<!--{if $_G['setting']['strongpw']}-->
	<!--{loop $_G['setting']['strongpw'] $key $val}-->
	strongpw[$key] = $val;
	<!--{/loop}-->
	<!--{/if}-->
	var pwlength = <!--{if $_G['setting']['pwlength']}-->$_G['setting']['pwlength']<!--{else}-->0<!--{/if}-->;
		checkPwdComplexity(document.getElementById('newpasswd1'), document.getElementById('newpasswd2'));
</script>
<!--{template lyear:footer}-->